//Error 404
if ((str.indexOf("/search?")!=-1)||(str.indexOf("archive.html")!=-1)) {
  document.write("<div style=\"text-align:center;padding:10px;background-color:#0f0f0f;\"><img src=\"http://dl.dropbox.com/u/52283085/47/404.png\" \/><br><br>Trang mà bạn đang tìm không tồn tại trên website.<br> Click <a style='font-weight:bold; color: green;' href=\"http://www.kenhvnphim.blogspot.com\">vào đây<\/a> để trở về trang chủ.<\/div>");
}
else {
var rcpage = new Array();
    if (view=="full") {
        var numposts = 16; // số bài viết hiển thị trên 1 trang
    }
    else {var numposts = 16;}
    
    var numpage=totalPosts/numposts;
    var lastnum = totalPosts%numposts;
    
if (lastnum==0) {numpage=numpage+1;}
for (var m=1;m<numpage;m++) {
var start=numposts*(m-1)+1;
rcpage[m] ="<script src=\"http://www.kenhvnphim.blogspot.com/feeds/posts/default"+textlabel+"?start-index="+start+"&max-results="+numposts+"&orderby=published&alt=json-in-script&callback=showrecentposts\"><\/script>";
}
if ((page>numpage)&&(page<numpage+1)&&(lastnum>0)) {
var numposts=lastnum;
start = totalPosts-lastnum+1;
document.write("<script src=\"http://www.kenhvnphim.blogspot.com/feeds/posts/default"+textlabel+"?start-index="+start+"&max-results="+numposts+"&orderby=published&alt=json-in-script&callback=showrecentposts\"><\/script>");
}
else if ((page>numpage)||((page>numpage-1)&&(lastnum==0))){document.write("<div style=\"text-align:center;padding:20px 10px;background-color:#0f0f0f;\"><img src=\"http://dl.dropbox.com/u/52283085/47/404.png\" \/><br><br>Trang mà bạn đang tìm không tồn tại trên website.<br>Click <a style='font-weight:bold; color: green;' href=\"http://www.kenhvnphim.blogspot.com\">để trở về trang chủ.<\/div>"); }
else {document.write(rcpage[page]); }
// Create page navigation
if (lastnum==0) {var pagelist=totalPosts/numposts;} else {var pagelist=numpage+1;}
var pagelist1 = parseInt(pagelist);
var npage = parseFloat(page);
if (page<=parseInt(pagelist)) {
if ((pagelist>=2)&&(pagelist1<6)) {
document.write("<div id=\"page-rc-tooltip\">Page ("+page+"/"+parseInt(pagelist)+") : ");
for (var n=1;n<pagelist1+1;n++) {
if (n==npage) {var navpage=" <span class=\"currentpage\" >"+n+"<\/span>";} else {var navpage=" <a href=\"http://www.kenhvnphim.blogspot.com/"+textpage+"?v="+view+"&page="+n+"\">"+n+"<\/a>";}
document.write(navpage);
}
document.write("<\/div>");
}
if ((pagelist>=6)&&(page<4)) {
document.write("<div id=\"page-rc-tooltip\">Page ("+page+"/"+parseInt(pagelist)+") : ");
for (var n=1;n<6;n++) {
if (n==npage) {var navpage=" <span class=\"currentpage\" >"+n+"<\/span>";} else {var navpage=" <a href=\"http://www.kenhvnphim.blogspot.com/"+textpage+"?v="+view+"&page="+n+"\">"+n+"<\/a>";}
document.write(navpage);
}
if (parseInt(pagelist)>5) { document.write(" ... <a href=\"http://www.kenhvnphim.blogspot.com/"+textpage+"?v="+view+"&page="+parseInt(pagelist)+"\">Last<\/a><\/div>"); } else {document.write("<\/div>");}
}
else if ((pagelist>=6)&&(page>3)&&(page<parseInt(pagelist)-2)) {
var first = page-2;
var last = first+5;
document.write("<div id=\"page-rc-tooltip\">Page ("+page+"/"+parseInt(pagelist)+") : <a href=\"http://www.kenhvnphim.blogspot.com/"+textpage+"?v="+view+"&page=1\">First<\/a> ...");
for (var n=first;n<last;n++) {
if (n==npage) {var navpage=" <span class=\"currentpage\" >"+n+"<\/span>";} else {var navpage=" <a href=\"http://www.kenhvnphim.blogspot.com/"+textpage+"?v="+view+"&page="+n+"\">"+n+"<\/a>";}
document.write(navpage);
}
document.write(" ... <a href=\"http://www.kenhvnphim.blogspot.com/"+textpage+"?v="+view+"&page="+parseInt(pagelist)+"\">Last<\/a><\/div>");
}
else if ((pagelist>=6)&&(page>3)&&(page>parseInt(pagelist)-3)) {
var first = parseInt(pagelist)-4;
var last = parseInt(pagelist)+1;
document.write("<div id=\"page-rc-tooltip\">Page ("+page+"/"+parseInt(pagelist)+") : <a href=\"http://www.kenhvnphim.blogspot.com/"+textpage+"?v="+view+"&page=1\">First<\/a> ...");
for (var n=first;n<last;n++) {
if (n==npage) {var navpage=" <span class=\"currentpage\" >"+n+"<\/span>";} else {var navpage=" <a href=\"http://www.kenhvnphim.blogspot.com/"+textpage+"?v="+view+"&page="+n+"\">"+n+"<\/a>";}
document.write(navpage);
}
document.write("<\/div><div class='clear'></div>");
}
}
} //kết thúc lệnh không cho phép hiện thị tiện ích trên trang archive